import { defineStore } from 'pinia'
import exhibition from '../../api/exhibition';
export const useExhibitionOrderListStore = defineStore('exhibitionOrder', {
    state: () => ({
        exhiOrder:[],
        loading:false
    }),
    actions: {
        changeLoading() {
            this.loading = !this.loading
            setTimeout(() => {
                this.loading = !this.loading
            }, 500);
        },
        initExhiOrder(id){
            this.loadingExhiOrder(id).then(res=>{
                this.exhiOrder=res.data.data
            }).catch(err=>{
                console.log(err)
            })
        },
        loadingExhiOrder(id){
            return exhibition.getExhibitionOrderById(id)
        }
    },
    getters: {
        
    },
}
)